#!/bin/bash

# install python3-serial to have /usr/bin/miniterm

cat > /tmp/mouz.logrotate.conf <<EOF
$PWD/.miniterm.log {
   missingok
   nocompress
   rotate 9
}
EOF
/usr/sbin/logrotate -f -s /tmp/mouz.logrotate.state /tmp/mouz.logrotate.conf

/usr/bin/xfce4-terminal \
  --show-borders \
  --maximize \
  --hide-menubar \
  --title 'miniterm' \
  --zoom 0 \
  --command='script -f -c "/usr/bin/miniterm /dev/ttyUSB0 9600" .miniterm.log'

# --command='script -f -c "/usr/bin/miniterm /dev/ttyUSB0 115200" .miniterm.log' \
# --command='script -f -c "/usr/bin/miniterm /dev/ttyACM0 9600" .miniterm.log' \
